import {Component, OnInit} from '@angular/core';
import {Router} from '@angular/router';
import {NzModalService} from 'ng-zorro-antd';
@Component({
  templateUrl: './exam-list.component.html',
  styleUrls: ['./exam-list.component.css'],
})
export class ExamListComponent implements OnInit {
  data = [
    {
      name: 'John Brown',
    }, {
      name: 'Jim Green',
    }, {
      name: 'Joe Black',
    }
  ];

  constructor(private router: Router,
              private confirmServ: NzModalService) {
  }

  ngOnInit() {
  }

  onStartExam() {
    const self = this;
    self.confirmServ.confirm({
      title: '提示',
      content: '您是否确认要开始考试？',
      onOk() {
        self.router.navigate(['exam-system']);
      },
      onCancel() {
      }
    });
  }
}
